var robot = require("robotjs");

/*

Argument	Description	                       Default
down	    Accepts down or up.	               down
button	  Accepts left, right, or middle.	   left
*/

robot.mouseToggle("down"/*←默认第一个参数为'down'*/); //鼠标一直按住当前位置 相当于js mousedown

setTimeout(function () {
  robot.mouseToggle("up"/*,'left'*//*← 默认为left*/); //相当于js mouseup

}, 2000);
